package com.maxlen.camunda.utils;

import java.io.IOException;
import java.io.InputStream;

public class FileUtils {

    /**
     * 读取字节流
     * @param inputStream 字节流
     * @return 结果
     */
    public static String readInputStream(InputStream inputStream){
        byte[] buffer = new byte[16*1024];
        StringBuilder stringBuffer = new StringBuilder();
        int read = 0;
        try {
            read = inputStream.read(buffer);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        stringBuffer.append(new String(buffer, 0, read));
        return stringBuffer.toString();
    }

}
